 
package com.xbongbong.paas.domain.entity;

import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import com.xbongbong.paas.toolbox.wrap.Entity;
import com.xbongbong.saas.enums.ListGroupEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
* @author autoGen
* @time 2018-08-13 10:46:07
*/
@Getter
@Setter
@ToString
public class PaasListGroupEntity extends Entity {

	/** Comment for <code>serialVersionUID</code> */
	private static final long serialVersionUID = -6671960805759188596L;

	//========== properties ==========
	
	/**
	* 主键
	*/
	private Long id;
	/**
	* 公司id
	*/
	private String corpid;
	/**
	 * 应用id
	 */
	private Long appId;
	/**
	 * 菜单id
	 */
	private Long menuId;
	/**
	* 分组名
	*/
	private String name;
	/**
	* 排序
	*/
	private Integer sort;
	/**
	* 查询条件json
	*/
	private String jsonData;
	/**
	* 创建者id
	*/
	private String creatorId;
	/**
	* 创建时间时间戳
	*/
	private Long addTime;
	/**
	* 更新时间时间戳
	*/
	private Long updateTime;
	/**
	* 删除标记
	*/
	private Integer del;
	/**
	 * 默认分组code
	 */
	private Integer defaultGroupCode;
	/**
	 * 表单id
	 */
	private Long formId;

	public PaasListGroupEntity(){
		defaultGroupCode = 0;
		del = 0;
	}

	public PaasListGroupEntity(ListGroupEnum groupEnum) {
		this.name = groupEnum.getName();
		this.id = groupEnum.getCode().longValue();
		this.defaultGroupCode = groupEnum.getCode();
		this.jsonData = "[]";
		this.addTime = DateTimeUtil.getLong();
		this.updateTime = DateTimeUtil.getLong();
		this.del = 0;

	}

	public PaasListGroupEntity(Long id, String name, String jsonData, Integer defaultGroupCode) {
		this.id = id;
		this.name = name;
		this.jsonData = jsonData;
		this.defaultGroupCode = defaultGroupCode;
		this.addTime = DateTimeUtil.getLong();
		this.updateTime = DateTimeUtil.getLong();
		this.del = 0;
	}
}

